package org.hbkj.springbootmybatis.entity;

import java.math.BigDecimal;
import java.util.Date;

public class OrderDo {
    private String orderId;
    private Integer userId;
    private Integer goodsId;
    private Integer quantity;
    private String orderStatus;
    private Date createTime;
    private Date updateTime;
    private BigDecimal totalPrice;

    // 商品名称字段（已添加）
    private String goodsName;

    // 新增商品图片地址字段
    private String goodsPic;

    // 商品单价字段
    private BigDecimal unitPrice;

    // Getter 和 Setter 方法
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsPic() {
        return goodsPic;
    }

    public void setGoodsPic(String goodsPic) {
        this.goodsPic = goodsPic;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    // 重写 toString 方法（包含新增的 goodsName 和 goodsPic 字段）
    @Override
    public String toString() {
        return "OrderDo{" +
                "orderId='" + orderId + '\'' +
                ", userId=" + userId +
                ", goodsId=" + goodsId +
                ", quantity=" + quantity +
                ", orderStatus='" + orderStatus + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", totalPrice=" + totalPrice +
                ", goodsName='" + goodsName + '\'' +  // 新增商品名称
                ", goodsPic='" + goodsPic + '\'' +    // 新增商品图片地址
                ", unitPrice=" + unitPrice +          // 新增商品单价
                '}';
    }
}